package cs3343.project.family.testing;

import static org.junit.Assert.*;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;

import javax.swing.ImageIcon;
import javax.swing.JComboBox;

import cs3343.project.family.*;
import cs3343.project.family.Character;

import org.junit.Test;

public class ProfileTest {

	@Test
	// unit test
	// less than two ppl-> display error msg
	public void atLeastTwo() {

		int numPlayer=0;
		String result;
		// TODO change StartGame .java
		// 
		StartGame start=new StartGame();
		
		//start.getJComboBoxPlayer()=new JComboBox[7];
		
		// no player is selected
		for(int i=0;i<6;i++){
			start.getJComboBoxPlayer(i).setSelectedIndex(0);
		}
		start.selectedPlayer=numPlayer;
		
		start.getCenter().doClick();
		result=start.getWarningMsg();
		
		assertEquals(result, "Please select at least 2 characters");
		
	}

}
